﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script type="text/javascript" src="http://219.143.237.164:8080/caretrace/%20app%20/login?username=&pwd=admin"></script>
<script>DD_belatedPNG.fix('*');</script>

<![endif]-->
<title>登录</title>
<meta name="keywords" content="H-ui.admin v2.3,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v2.3，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
    <style type="text/css">
        .code {
            background-image: url(code.png);
            font-family: Arial;
            font-style: italic;
            color: Blue;
            border: 0;
            padding: 12px 10px;
            /*width: 20px;
            height: 20px;*/
            letter-spacing: 4px;
            font-weight: bolder;
        }
        .unchanged {
            border: 0;
        }
    </style>
    <script language="javascript" type="text/javascript">
        var code; //在全局 定义验证码
        function createCode() {
            code = "";
            var codeLength = 4;//验证码的长度
            var checkCode = document.getElementById("checkCode");
            var selectChar = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);//所有候选组成验证码的字符，当然也可以用中文的'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'

            for (var i = 0; i < codeLength; i++) {
                var charIndex = Math.floor(Math.random() * 10);
                code += selectChar[charIndex];
            }
            //alert(code);
            if (checkCode) {
                checkCode.className = "code";
                checkCode.value = code;
            }
        }

        function validate() {
            var inputCode = document.getElementById("input1").value;
            var inputUser=document.getElementById("inputUser").value;
            var inputPswd=document.getElementById("inputPswd").value;
            if (inputUser.length <= 0) {
                layer.msg("请输入用户名！");
            }/*else if(inputUser!='admin'){
                layer.msg('用户名错误!请重新输入',{icon: 5, time: 2000});
                document.getElementById("inputUser").value='';
            }*/else
            if (inputPswd.length <= 0) {
                layer.msg("请输入密码！");
            }/*else if(inputPswd!='admin'){
                layer.msg('密码错误！请重新输入',{icon: 5, time: 2000});
                document.getElementById("inputPswd").value='';
            }*/else
            if (inputCode.length <= 0) {
                layer.msg("请输入验证码！");
            } else if (inputCode != code) {
                layer.msg("验证码输入错误！",{icon: 5, time: 2000});

                createCode();//刷新验证码
                document.getElementById("input1").value='';

            } else {

                $(function(){

                    $.ajax(
                            {
                                type:'get',
                               url :'http://219.143.237.164:8080/caretrace/app/login?username='+inputUser+'&pwd='+inputPswd,
                                dataType : 'jsonp',
                                success  : function(data) {
                                   //console.log(data.code);
                                   if(data.code=='0'){
                                    layer.msg("登录成功！",{icon: 6, time: 1000});
                                    on_load('index.html');
}else{
	layer.msg("登录失败！请检查用户名和密码",{icon: 5 ,time:1000});
}
                                },
                                error : function() {
                                    
                                     layer.msg("登录失败！请检查用户名和密码",{icon: 5 ,time:3000});
                                   // alert('失败');
                                  
                                }
                            }
                    );
                });

            }
        }
        function custom_close(){
            if(layer.confirm("您确定要退出本系统吗？")){
                window.opener=null;
                window.open('','_self');
                window.close();
            }
            else{
            	
            }
            
        }
        function on_load(url){
        //layer_show(title,url,w,h);
        self.location=url;
    }
    </script>
    <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
    <script type="text/javascript" src="js/H-ui.admin.js"></script>
</head>
<body onload="createCode()">
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header"></div>
<div class="loginWraper">
  <div id="loginform" class="loginBox">
    <form class="form form-horizontal" action="index.html" method="post">
      <div class="row cl">
        <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
        <div class="formControls col-xs-8">
          <input id="inputUser" name="" type="text" placeholder="用户名11位手机号码" class="input-text size-L" value="13042000806">
        </div>
      </div>
      <div class="row cl">
        <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
        <div class="formControls col-xs-8">
          <input id="inputPswd" name="" type="password" placeholder="密码" class="input-text size-L" value="admin">
        </div>
      </div>
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <input class="input-text size-L" type="text" id="input1" placeholder="验证码"  style="width:150px;">
            <input type="text" onclick="createCode()" readonly="readonly" id="checkCode" class="unchanged" style="width: 60px" /><br />
            <!--<img src="images/VerifyCode.aspx.png"> <a id="kanbuq" href="javascript:;">看不清，换一张</a> -->
        </div>
      </div>
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <label for="online">
            <input type="checkbox" name="online" id="online" value="">
            使我保持登录状态</label>
        </div>
      </div>
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <input name="" type="button" onclick="validate();"  class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
          <input name="" type="button" onclick="custom_close()" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
        </div>
      </div>
    </form>
  </div>
</div>
<div class="footer">Copyright 北京世纪九州软件有限公司</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="js/H-ui.js"></script>

<!--<script>
    
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F080836300300be57b7f34f4b3e97d911' type='text/javascript'%3E%3C/script%3E"));
</script>-->
<!--<script>
    var inputUser=document.getElementById("inputUser").value;
    var inputPswd=document.getElementById("inputPswd").value;

</script>-->
</body>
</html>